<?xml version="1.0" encoding="UTF-8" ?>
<%@page
	contentType="text/html;charset=UTF-8"
	pageEncoding="UTF-8"
	import="fr.utbm.gi.in56.error.ErrorType"
%>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
        <link rel="stylesheet" media="screen" type="text/css" title="Style" href="style.css" />
        <title>L'Entre-Pot</title>
    </head>
    <body>
        <div id ="container">
            <jsp:directive.include file="header.jsp"/>
            <jsp:directive.include file="topMenu.jsp"/>
            
            <div id="core">
                <div id="frame">
					<% ErrorType error = (ErrorType)request.getAttribute( "registrationError" );%>
                    <%
                        if( error != null )
                        {
					%>
                            <div id="error">
                                <%= error.getErrorMessage() %>
                            </div>
					<%
                        }
                    %>
                    <form method="post" action="RegisterServlet" name="connexion">
                        <p class="center">
                            <label for="login">Identifiant :</label>
                            <input type="text" name="login" id="login" maxlength="20" />
                        </p>
                        <p class="center">
                            <label for="password">Mot de passe :</label>
                            <input type="password" name="password1" id="password1" maxlength="20"/>
                        </p>
                        <p class="center">
                            <label for="password">Confirmation :</label>
                            <input type="password" name="password2" id="password2" maxlength="20"/>
                        </p>
                        <p class="center">
                            <label for="county">Département :</label>
                            <select name="county" id="county">
		                        <option selected="selected">01</option>
		                        <%
		                        	for ( int county = 2; county <= 95; ++county )
		                        	{
		                        		if ( county < 10 )
		                        		{
		                        %>
		                        <option value="0<%= county %>">0<%= county %></option>
		                        <%
		                        		}
		                        		else
		                        		{
		                       %>
		                        <option value="<%= county %>"><%= county %></option>
		                        <%		
		                        		}
		                        	}
		                        %>
							</select>
                        </p>
                        <p class="center">
                            <input type="submit" value="S'enregistrer" name="register"/>
                        </p>
                    </form>
                </div>
            </div>
            
            <jsp:directive.include file="footer.jsp"/>
        </div>
    </body>
</html>